package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {
        //Inter o =nwe Inter();//编译错误,接口不能被实例化
    }
}

 interface Inter{
    void show();
    void  test();//接口中的方法默认都是抽象的,前面默认有abstract
    //void say(){};//编译错误,抽象方法不能有方法体
}

class  Interimpl implements Inter{
    public void show(){
        //重写接口中的抽象方法时,必须加上public
    }
    public void test(){}
}

interface Inter1{
     void test();
}
interface Inter2{
     void show();
}

abstract class  Aoo{
    abstract void say();
}

class  Boo extends Aoo implements Inter1,Inter2{
    public void test(){};
    public void show(){};
    void say(){};
}

//接口继承接口
interface Inter3{
    void show();
}

interface  Inter4 extends Inter3{
    void test();
}

class  Coo implements Inter4{
    public void show(){}
    public void test(){}
}